#                                               -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.

AC_PREREQ(2.61)
AC_INIT(UploadHelper, 4.0.0, tyllrxs@gmail.com)
AM_INIT_AUTOMAKE(UploadHelper, 4.0)

# Checks for programs.
AC_PROG_CXX
AC_PROG_CC

# Checks for libraries.
m4_include(wxwin.m4)
AM_OPTIONS_WXCONFIG
reqwx=2.8.7
AM_PATH_WXCONFIG($reqwx, wxWin=1)
if test "$wxWin" != 1; then
    AC_MSG_ERROR([
        wxWidgets must be installed on your system.
        Please check that wx-config is in path, the directory
        where wxWidgets libraries are installed (returned by
        'wx-config --libs' or 'wx-config --static --libs' command)
        is in LD_LIBRARY_PATH or equivalent variable and
        wxWidgets version is $reqwx or above.
        ])
fi
CPPFLAGS="$CPPFLAGS $WX_CPPFLAGS"
CXXFLAGS="-w $CXXFLAGS $WX_CXXFLAGS_ONLY"
CFLAGS="$CFLAGS $WX_CFLAGS_ONLY"
LIBS="$LIBS $WX_LIBS"

AC_CHECK_LIB(curl, curl_easy_setopt, ,AC_MSG_ERROR([
        libcurl cannot be found on your system.
        try install it using command such as 'sudo apt-get install libcurl4-gnutls-dev'.
        ]))

# Checks for header files.
AC_CHECK_HEADERS([sys/time.h])
AC_CHECK_HEADERS([curl/curl.h])

# Checks for typedefs, structures, and compiler characteristics.
AC_HEADER_STDBOOL
AC_C_CONST
AC_TYPE_SIZE_T

# Checks for library functions.

AC_OUTPUT(Makefile)
